package com.yy.wga.resource.service.request;

import com.yy.wga.common.dto.BasePageRequestDTO;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

@Data
public class ResourceGoodsCategoryReq {

    @Data
    public static class AddCategory {

        @NotNull
        private Integer styleType;

        @NotNull
        private Integer sort;

        @NotBlank
        private String name;

        @NotBlank
        private String imgUrl;

        // 首页是否展示 0 不展示 1 展示
        private Integer homepageDisplay;


        // 首页是否展示 0 不展示 1 展示
        private Integer supportSubsidyAmount;

        private String remark;

    }

    @Data
    public static class UpdateCategory {

        @NotNull
        private Integer id;

        @NotNull
        private Integer styleType;

        @NotNull
        private Integer sort;

        @NotBlank
        private String name;

        @NotBlank
        private String imgUrl;

        // 首页是否展示 0 不展示 1 展示
        private Integer homepageDisplay;

        // 首页是否展示 0 不展示 1 展示
        private Integer supportSubsidyAmount;

        private String remark;

    }


    @Data
    public static class DeleteCategory {

        @NotEmpty
        private List<Integer> ids;

    }

    @Data
    public static class SortCategory {
        @NotEmpty
        private List<IdSort> dataList;
    }


    @Data
    public static class ChangeCategoryStatus {
        @NotEmpty
        private List<IdStatus> dataList;
    }

    @Data
    public static class ChangeHomepageDisplay {

        @NotNull
        private Integer id;
        // 首页是否展示 0 不展示 1 展示
        @NotNull
        private Integer homepageDisplay;

    }

    @Data
    public static class ChangeSupportSubsidyAmount {

        @NotNull
        private Integer id;
        // 首页是否展示 0 不展示 1 展示
        @NotNull
        private Integer supportSubsidyAmount;

    }


    @Data
    public static class AddGoods {

        @NotNull
        private Integer categoryId;

        @NotEmpty
        private List<Goods> goodsList;

    }

    @Data
    public static class DeleteGoods {

        @NotNull
        private Integer categoryId;

        @NotEmpty
        private List<Goods> goodsList;

    }

    @Data
    public static class PageGoods extends BasePageRequestDTO {

        @NotNull
        private Integer categoryId;
    }

    @Data
    public static class AllGoods {

        @NotNull
        private Integer categoryId;
    }


    @Data
    public static class SortGoods {

        @NotNull
        private Integer categoryId;

        @NotEmpty
        private List<GoodsSort> dataList;
    }

    @Data
    public static class SetRecommendReason {
        @NotNull
        private Integer categoryId;
        @NotBlank
        private String spuId;
        @NotBlank
        private String shopAppid;
        private String recommendReason;
    }

    @Data
    public static class SetSubsidyAmount{
        @NotNull
        private Integer categoryId;
        @NotBlank
        private String spuId;
        @NotBlank
        private String shopAppid;

        private Integer subsidyAmount;
    }


    @Data
    public static class IdSort {
        @NotNull
        private Integer id;
        @NotNull
        private Integer sort;
    }

    @Data
    public static class IdStatus {
        @NotNull
        private Integer id;
        @NotNull
        private Integer status;
    }

    @Data
    public static class Goods {
        @NotBlank
        private String spuId;
        @NotBlank
        private String shopAppid;
    }

    @Data
    public static class GoodsSort {
        @NotBlank
        private String spuId;
        @NotBlank
        private String shopAppid;
        @NotNull
        private Integer sort;
    }

    @Data
    public static class GetHeadSupplierGoodsReq {

        private String nextKey;

        /**
         * 每页最大30条
         */
        @NotNull
        private Integer pageSize;
    }

    @Data
    public static class GetHeadSupplierGoodsReqV2 extends BasePageRequestDTO {

        private String keyword;
    }


}
